<?php ob_start() ?>


<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
    <?php if (isset($_SESSION['publicidad_msj'])) { ?>
    <div class="alert alert-success alert-dismissable col-lg-12 text-center">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <strong><?php echo $_SESSION['publicidad_msj'] ?></strong>
    </div>
    <?php
    unset($_SESSION['publicidad_msj']);
}
?>
    <div class="container">
        <h1>Hello, world!</h1>
        <p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
        <p><a class="btn btn-primary btn-lg" role="button">Learn more &raquo;</a></p>
    </div>
</div>

<div class="container">
    <!-- Example row of columns -->
    <div class="row">
        <?php foreach ($params_tarifas as $fila) { ?>
            <div class="col-md-4">
                <h2><?php echo $fila['nombre']; ?></h2>
                <p><?php echo $fila['descripcion']; ?></p>
                <p><a class="btn btn-default" data-toggle="modal" data-target="#modalTarifa<?php echo $fila['id']; ?>">Ver detalles &raquo;</a></p>
            </div>


            <!-- Modal -->
            <div class="modal fade" id="modalTarifa<?php echo $fila['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="modalTarifa" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="panel-body">
                            <h2>Datos de la tarifa</h2>
                            <div class="table-responsive">
                                <table class="table table-bordered table-striped table-hover">
                                    <tbody>
                                        <tr>
                                            <th>Nombre</th>
                                            <td><?php echo $fila['nombre'] ?></td>
                                        </tr>
                                        <tr>
                                            <th>Descripción</th>
                                            <td><?php echo $fila['descripcion'] ?></td>
                                        </tr>
                                        <tr>
                                            <th>Precio</th>
                                            <td><?php echo $fila['precio'] ?></td>
                                        </tr>
                                        <tr>
                                            <th>Impresiones</th>
                                            <td><?php echo $fila['impresiones'] ?></td>
                                        </tr>
                                        <tr>
                                            <th>País</th>
                                            <td><?php echo $fila['paisnombre'] ?></td>
                                        </tr>
                                        <tr>
                                            <th>Sitio</th>
                                            <td><?php echo $fila['sitionombre'] ?></td>
                                        </tr>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php } ?>
    </div>
    <?php
    $contenido = ob_get_clean();
    include 'app/templates/template_publica.php';
    ?>
